Class: OrbipayPaymentsapiClient::OrbipayPaymentsapiClientModels::RefundResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/orbipay_paymentsapi_client/models/refund_response.rb

Overview

.

############################################################################################
## This class subject to change without prior notice, Please dont use this class directly.##
############################################################################################

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ RefundResponse

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 130

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'refund_reference')
    self.refund_reference = attributes[:'refund_reference']
  end

  if attributes.has_key?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.has_key?(:'url')
    self.url = attributes[:'url']
  end

  if attributes.has_key?(:'refund_type')
    self.refund_type = attributes[:'refund_type']
  end

  if attributes.has_key?(:'refund_amount')
    self.refund_amount = attributes[:'refund_amount']
  end

  if attributes.has_key?(:'fee_refund')
    self.fee_refund = attributes[:'fee_refund']
  end

  if attributes.has_key?(:'status')
    self.status = attributes[:'status']
  end

  if attributes.has_key?(:'confirmation_number')
    self.confirmation_number = attributes[:'confirmation_number']
  end

  if attributes.has_key?(:'refund_date')
    self.refund_date = attributes[:'refund_date']
  end

  if attributes.has_key?(:'refund_entry_date')
    self. = attributes[:'refund_entry_date']
  end

  if attributes.has_key?(:'expected_refund_settlement_date')
    self.expected_refund_settlement_date = attributes[:'expected_refund_settlement_date']
  end

  if attributes.has_key?(:'custom_fields')
    if (value = attributes[:'custom_fields']).is_a?(Hash)
      self.custom_fields = value
    end
  end

  if attributes.has_key?(:'comments')
    self.comments = attributes[:'comments']
  end

  if attributes.has_key?(:'source_payment')
    self.source_payment = attributes[:'source_payment']
  end

  if attributes.has_key?(:'payment_network_response')
    self.payment_network_response = attributes[:'payment_network_response']
  end

  if attributes.has_key?(:'audit_info')
    self.audit_info = attributes[:'audit_info']
  end
end

Instance Attribute Details

#audit_infoAuditInfoVo (readonly)

Returns The attribute audit_info.

Returns:



82
83
84
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 82

def audit_info
  @audit_info
end

#commentsString (readonly)

Comments that can be used to recollect the operation performed on the resource object. API clients need to ensure that no sensitive information is passed in the memo. Alacriti (EBPP) is not responsible for the security of any sensitive information that may be passed as part of the memo.

Returns:

  • (String)

    The attribute comments.



73
74
75
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 73

def comments
  @comments
end

#confirmation_numberString (readonly)

The confirmation number or reference provided to the customer for the refund.

Returns:

  • (String)

    The attribute confirmation_number.



53
54
55
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 53

def confirmation_number
  @confirmation_number
end

#custom_fieldsHash<String, String> (readonly)

The additional information or meta-information that EBPP can accept, maintain and transmit back to the client. The custom fields need to be configured with EBPP before they can be accepted. EBPP would reject custom fields that are not pre-configured. Please contact <a href = "mailto: support@billerpayments.com">support@billerpayments.com</a> for more information on configuring and using custom fields.

Returns:

  • (Hash<String, String>)

    The attribute custom_fields.



69
70
71
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 69

def custom_fields
  @custom_fields
end

#expected_refund_settlement_dateString (readonly)

The date by which the credits would be posted to the original funding account. ISO8601 full-date format, YYYY-MM-DD

Returns:

  • (String)

    The attribute expected_refund_settlement_date.



65
66
67
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 65

def expected_refund_settlement_date
  @expected_refund_settlement_date
end

#fee_refundFeeRefundResponse (readonly)

Returns The attribute fee_refund.

Returns:



45
46
47
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 45

def fee_refund
  @fee_refund
end

#idString (readonly)

The unique identifier assigned by EBPP to the refund.

Returns:

  • (String)

    The attribute id.



30
31
32
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 30

def id
  @id
end

#payment_network_responsePaymentNetworkResponseVo (readonly)

Returns The attribute payment_network_response.

Returns:



79
80
81
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 79

def payment_network_response
  @payment_network_response
end

#refund_amountString (readonly)

The refund amount upto 2 decimal places.

Returns:

  • (String)

    The attribute refund_amount.



42
43
44
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 42

def refund_amount
  @refund_amount
end

#refund_dateString (readonly)

The date on which the refund is scheduled to be made. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.

Returns:

  • (String)

    The attribute refund_date.



57
58
59
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 57

def refund_date
  @refund_date
end

#refund_entry_dateString (readonly)

The date on which the refund captured in EBPP. It must be in ISO8601 full-date format, namely, YYYY-MM-DD.

Returns:

  • (String)

    The attribute refund_entry_date.



61
62
63
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 61

def 
  @refund_entry_date
end

#refund_referenceString (readonly)

The unique identifier in the client system for the refund.

Returns:

  • (String)

    The attribute refund_reference.



26
27
28
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 26

def refund_reference
  @refund_reference
end

#refund_typeString (readonly)

The portion of the payment amount that is to be or has been refunded. The original payment can be refunded fully including the amount and the fee components, or partially, for just the amount or the fee component. Refund can also be initiated for an arbitrary amount limited by the original payment amount.

Returns:

  • (String)

    The attribute refund_type.



38
39
40
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 38

def refund_type
  @refund_type
end

#source_paymentSourcePayment (readonly)

Returns The attribute source_payment.

Returns:



76
77
78
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 76

def source_payment
  @source_payment
end

#statusString (readonly)

The status of the refund.

Returns:

  • (String)

    The attribute status.



49
50
51
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 49

def status
  @status
end

#urlString (readonly)

This URL fetches the details of refund.

Returns:

  • (String)

    The attribute url.



34
35
36
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 34

def url
  @url
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 85

def self.attribute_map
  {
    :'refund_reference' => :'refund_reference',
    :'id' => :'id',
    :'url' => :'url',
    :'refund_type' => :'refund_type',
    :'refund_amount' => :'refund_amount',
    :'fee_refund' => :'fee_refund',
    :'status' => :'status',
    :'confirmation_number' => :'confirmation_number',
    :'refund_date' => :'refund_date',
    :'refund_entry_date' => :'refund_entry_date',
    :'expected_refund_settlement_date' => :'expected_refund_settlement_date',
    :'custom_fields' => :'custom_fields',
    :'comments' => :'comments',
    :'source_payment' => :'source_payment',
    :'payment_network_response' => :'payment_network_response',
    :'audit_info' => :'audit_info'
  }
end

.swagger_typesObject

Attribute type mapping.



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 107

def self.swagger_types
  {
    :'refund_reference' => :'String',
    :'id' => :'String',
    :'url' => :'String',
    :'refund_type' => :'String',
    :'refund_amount' => :'String',
    :'fee_refund' => :'FeeRefundResponse',
    :'status' => :'String',
    :'confirmation_number' => :'String',
    :'refund_date' => :'String',
    :'refund_entry_date' => :'String',
    :'expected_refund_settlement_date' => :'String',
    :'custom_fields' => :'Hash<String, String>',
    :'comments' => :'String',
    :'source_payment' => :'SourcePayment',
    :'payment_network_response' => :'PaymentNetworkResponseVo',
    :'audit_info' => :'AuditInfoVo'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • o (Object)

    Object to be compared



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 214

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      refund_reference == o.refund_reference &&
      id == o.id &&
      url == o.url &&
      refund_type == o.refund_type &&
      refund_amount == o.refund_amount &&
      fee_refund == o.fee_refund &&
      status == o.status &&
      confirmation_number == o.confirmation_number &&
      refund_date == o.refund_date &&
       == o. &&
      expected_refund_settlement_date == o.expected_refund_settlement_date &&
      custom_fields == o.custom_fields &&
      comments == o.comments &&
      source_payment == o.source_payment &&
      payment_network_response == o.payment_network_response &&
      audit_info == o.audit_info
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • type (string)

    Data type

  • value (string)

    Value to be deserialized

Returns:

  • (Object)

    Deserialized data



271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 271

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    if value.nil?
      value
    else
      value.to_s
    end
  when :Integer
    if value.nil?
      value
    else
      value.to_i
    end
  when :Float
    if value.nil?
      value
    else
      value.to_f
    end
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = OrbipayPaymentsapiClient::OrbipayPaymentsapiClientModels.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash, Object

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash

  • (Object)

    Returns the object if it cannot be converted to hash



350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 350

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 250

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        set_values(key => attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      set_values(key => _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • o (Object)

    Object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


237
238
239
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 237

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



243
244
245
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 243

def hash
  [refund_reference, id, url, refund_type, refund_amount, fee_refund, status, confirmation_number, refund_date, , expected_refund_settlement_date, custom_fields, comments, source_payment, payment_network_response, audit_info].hash
end

#set_values(args) ⇒ Object



204
205
206
207
208
209
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 204

def set_values(args)
  args.each do |attr, arg|
    (class << self; self; end).send(:attr_reader, attr.to_sym)
    instance_variable_set("@#{attr}", arg)
  end
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



329
330
331
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 329

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



335
336
337
338
339
340
341
342
343
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 335

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



323
324
325
# File 'lib/orbipay_paymentsapi_client/models/refund_response.rb', line 323

def to_s
  to_hash.to_s
end