Class: Cryptopay::InvoiceRecalculationParams
- Inherits:
-
Object
- Object
- Cryptopay::InvoiceRecalculationParams
- Defined in:
- lib/cryptopay/models/invoice_recalculation_params.rb
Class Method Summary collapse
-
.build_from_hash(data) ⇒ Cryptopay::InvoiceRecalculationParams
Builds the object from hash.
Instance Method Summary collapse
-
#force_commit ⇒ Object
Is ‘false` if omitted.
-
#initialize(attributes = {}) ⇒ InvoiceRecalculationParams
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 = {}) ⇒ InvoiceRecalculationParams
Initializes the object
30 31 32 |
# File 'lib/cryptopay/models/invoice_recalculation_params.rb', line 30 def initialize(attributes = {}) @attributes = ENCODER.sanitize(attributes) end |
Class Method Details
.build_from_hash(data) ⇒ Cryptopay::InvoiceRecalculationParams
Builds the object from hash
23 24 25 26 |
# File 'lib/cryptopay/models/invoice_recalculation_params.rb', line 23 def self.build_from_hash(data) attributes = ENCODER.build_from_hash(data) new(attributes) end |
Instance Method Details
#force_commit ⇒ Object
Is ‘false` if omitted. Set `true` to turn off two-step recalculation. Set `false` for two-step recalculation and commit it within 30 seconds
35 36 37 |
# File 'lib/cryptopay/models/invoice_recalculation_params.rb', line 35 def force_commit @attributes[:force_commit] end |
#inspect ⇒ Object
57 58 59 |
# File 'lib/cryptopay/models/invoice_recalculation_params.rb', line 57 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?
41 42 43 |
# File 'lib/cryptopay/models/invoice_recalculation_params.rb', line 41 def invalid_properties [] end |
#to_hash ⇒ Hash
Returns the object in the form of hash
53 54 55 |
# File 'lib/cryptopay/models/invoice_recalculation_params.rb', line 53 def to_hash ENCODER.to_hash(@attributes) end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
47 48 49 |
# File 'lib/cryptopay/models/invoice_recalculation_params.rb', line 47 def valid? invalid_properties.empty? end |