Class: Wire4Client::DepositantesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/wire4_client/api/depositantes_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DepositantesApi



19
20
21
# File 'lib/wire4_client/api/depositantes_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/wire4_client/api/depositantes_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_depositants_using_get(authorization, subscription, opts = {}) ⇒ GetDepositants

Consulta de cuentas de depositantes Obtiene una lista de depositantes asociados al contrato relacionado a la subscripción.



28
29
30
31
# File 'lib/wire4_client/api/depositantes_api.rb', line 28

def get_depositants_using_get(authorization, subscription, opts = {})
  data, _status_code, _headers = get_depositants_using_get_with_http_info(authorization, subscription, opts)
  data
end

#get_depositants_using_get_with_http_info(authorization, subscription, opts = {}) ⇒ Array<(GetDepositants, Fixnum, Hash)>

Consulta de cuentas de depositantes Obtiene una lista de depositantes asociados al contrato relacionado a la subscripción.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/wire4_client/api/depositantes_api.rb', line 39

def get_depositants_using_get_with_http_info(authorization, subscription, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DepositantesApi.get_depositants_using_get ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling DepositantesApi.get_depositants_using_get"
  end
  # verify the required parameter 'subscription' is set
  if @api_client.config.client_side_validation && subscription.nil?
    fail ArgumentError, "Missing the required parameter 'subscription' when calling DepositantesApi.get_depositants_using_get"
  end
  if @api_client.config.client_side_validation && subscription.to_s.length > 36
    fail ArgumentError, 'invalid value for "subscription" when calling DepositantesApi.get_depositants_using_get, the character length must be smaller than or equal to 36.'
  end

  if @api_client.config.client_side_validation && subscription.to_s.length < 36
    fail ArgumentError, 'invalid value for "subscription" when calling DepositantesApi.get_depositants_using_get, the character length must be great than or equal to 36.'
  end

  if @api_client.config.client_side_validation && subscription !~ Regexp.new(/[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[34][A-Fa-f0-9]{3}-[89ab][A-Fa-f0-9]{3}-[A-Fa-f0-9]{12}$/)
    fail ArgumentError, "invalid value for 'subscription' when calling DepositantesApi.get_depositants_using_get, must conform to the pattern /[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[34][A-Fa-f0-9]{3}-[89ab][A-Fa-f0-9]{3}-[A-Fa-f0-9]{12}$/."
  end

  # resource path
  local_var_path = '/subscriptions/{subscription}/depositants'.sub('{' + 'subscription' + '}', subscription.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Authorization'] = authorization

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GetDepositants')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DepositantesApi#get_depositants_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#register_depositants_using_post(authorization, register, subscription, opts = {}) ⇒ DepositantsResponse

Registra un nuevo depositante Registra un nuevo depositante en el contrato asociado a la subscripción.



100
101
102
103
# File 'lib/wire4_client/api/depositantes_api.rb', line 100

def register_depositants_using_post(authorization, register, subscription, opts = {})
  data, _status_code, _headers = register_depositants_using_post_with_http_info(authorization, register, subscription, opts)
  data
end

#register_depositants_using_post_with_http_info(authorization, register, subscription, opts = {}) ⇒ Array<(DepositantsResponse, Fixnum, Hash)>

Registra un nuevo depositante Registra un nuevo depositante en el contrato asociado a la subscripción.



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/wire4_client/api/depositantes_api.rb', line 112

def register_depositants_using_post_with_http_info(authorization, register, subscription, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DepositantesApi.register_depositants_using_post ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling DepositantesApi.register_depositants_using_post"
  end
  # verify the required parameter 'register' is set
  if @api_client.config.client_side_validation && register.nil?
    fail ArgumentError, "Missing the required parameter 'register' when calling DepositantesApi.register_depositants_using_post"
  end
  # verify the required parameter 'subscription' is set
  if @api_client.config.client_side_validation && subscription.nil?
    fail ArgumentError, "Missing the required parameter 'subscription' when calling DepositantesApi.register_depositants_using_post"
  end
  if @api_client.config.client_side_validation && subscription.to_s.length > 36
    fail ArgumentError, 'invalid value for "subscription" when calling DepositantesApi.register_depositants_using_post, the character length must be smaller than or equal to 36.'
  end

  if @api_client.config.client_side_validation && subscription.to_s.length < 36
    fail ArgumentError, 'invalid value for "subscription" when calling DepositantesApi.register_depositants_using_post, the character length must be great than or equal to 36.'
  end

  if @api_client.config.client_side_validation && subscription !~ Regexp.new(/[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[34][A-Fa-f0-9]{3}-[89ab][A-Fa-f0-9]{3}-[A-Fa-f0-9]{12}$/)
    fail ArgumentError, "invalid value for 'subscription' when calling DepositantesApi.register_depositants_using_post, must conform to the pattern /[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[34][A-Fa-f0-9]{3}-[89ab][A-Fa-f0-9]{3}-[A-Fa-f0-9]{12}$/."
  end

  # resource path
  local_var_path = '/subscriptions/{subscription}/depositants'.sub('{' + 'subscription' + '}', subscription.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Authorization'] = authorization

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(register)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DepositantsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DepositantesApi#register_depositants_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end