Class: Cryptopay::InvoiceRefundListResult
- Inherits:
-
Object
- Object
- Cryptopay::InvoiceRefundListResult
- Defined in:
- lib/cryptopay/models/invoice_refund_list_result.rb
Class Method Summary collapse
-
.build_from_hash(data) ⇒ Cryptopay::InvoiceRefundListResult
Builds the object from hash.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(attributes = {}) ⇒ InvoiceRefundListResult
constructor
Initializes the object.
- #inspect ⇒ Object
-
#invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ InvoiceRefundListResult
Initializes the object
30 31 32 |
# File 'lib/cryptopay/models/invoice_refund_list_result.rb', line 30 def initialize(attributes = {}) @attributes = ENCODER.sanitize(attributes) end |
Class Method Details
.build_from_hash(data) ⇒ Cryptopay::InvoiceRefundListResult
Builds the object from hash
23 24 25 26 |
# File 'lib/cryptopay/models/invoice_refund_list_result.rb', line 23 def self.build_from_hash(data) attributes = ENCODER.build_from_hash(data) new(attributes) end |
Instance Method Details
#data ⇒ Object
34 35 36 |
# File 'lib/cryptopay/models/invoice_refund_list_result.rb', line 34 def data @attributes[:data] end |
#inspect ⇒ Object
66 67 68 |
# File 'lib/cryptopay/models/invoice_refund_list_result.rb', line 66 def inspect "#<#{self.class}:0x#{object_id.to_s(16)}> JSON: " + JSON.pretty_generate(to_hash) end |
#invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/cryptopay/models/invoice_refund_list_result.rb', line 40 def invalid_properties properties = [] properties.push('invalid value for "data", data cannot be nil.') if data.nil? data&.each_with_index do |item, index| item.invalid_properties.each do |prop| properties.push("invalid value for \"data.#{index}\": #{prop}") end end properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
62 63 64 |
# File 'lib/cryptopay/models/invoice_refund_list_result.rb', line 62 def to_hash ENCODER.to_hash(@attributes) end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
56 57 58 |
# File 'lib/cryptopay/models/invoice_refund_list_result.rb', line 56 def valid? invalid_properties.empty? end |