Module: Moneybird::Traits::Service
- Included in:
- Service::Administration, Service::Contact, Service::CustomField, Service::Document::GeneralDocument, Service::Document::GeneralJournalDocument, Service::Document::PurchaseInvoice, Service::Document::Receipt, Service::Document::TypelessDocument, Service::DocumentStyle, Service::Estimate, Service::ExternalSalesInvoice, Service::FinancialAccount, Service::FinancialMutation, Service::Identity, Service::LedgerAccount, Service::Payment, Service::Product, Service::RecurringSalesInvoice, Service::SalesInvoice, Service::TaxRate, Service::Webhook, Service::Workflow
- Defined in:
- lib/moneybird/traits/service.rb
Instance Method Summary collapse
Instance Method Details
#build(attributes) ⇒ Object
4 5 6 |
# File 'lib/moneybird/traits/service.rb', line 4 def build(attributes) resource_class.build attributes.merge(client: client) end |
#resource_path(resource) ⇒ Object
8 9 10 |
# File 'lib/moneybird/traits/service.rb', line 8 def resource_path(resource) [path, resource.path].join('') end |