Class: Moneybird::Resource::Documents::Receipt
- Inherits:
-
Object
- Object
- Moneybird::Resource::Documents::Receipt
- Extended by:
- ClassMethods
- Includes:
- Moneybird::Resource
- Defined in:
- lib/moneybird/resource/documents/receipt.rb
Instance Attribute Summary
Attributes included from ClassMethods
#attributes, #logger, #nillable_attributes
Attributes included from Moneybird::Resource
Instance Method Summary collapse
- #contact=(attributes) ⇒ Object
- #details=(line_items) ⇒ Object
- #events=(events) ⇒ Object
- #notes=(notes) ⇒ Object
- #payments=(payments) ⇒ Object
Methods included from ClassMethods
build, has_attributes, has_boolean_attributes, has_datetime_attributes, has_integer_attributes, has_nillable_attributes, resource
Methods included from Moneybird::Resource
#attributes, #attributes=, #custom_fields=, #initialize, #link_booking, #path, #persisted?, #to_json
Instance Method Details
#contact=(attributes) ⇒ Object
41 42 43 |
# File 'lib/moneybird/resource/documents/receipt.rb', line 41 def contact=(attributes) @contact = Moneybird::Resource::Contact.build(attributes) end |
#details=(line_items) ⇒ Object
45 46 47 |
# File 'lib/moneybird/resource/documents/receipt.rb', line 45 def details=(line_items) @details = line_items.map{ |line_item| Moneybird::Resource::Invoice::Details.build(line_item) } end |
#events=(events) ⇒ Object
49 50 51 |
# File 'lib/moneybird/resource/documents/receipt.rb', line 49 def events=(events) @events = events.map{ |event| Moneybird::Resource::Generic::Event.build(event) } end |