Class: Pike13::API::V3::Desk::Invoices
- Defined in:
- lib/pike13/api/v3/desk/invoices.rb
Overview
Invoices resource Details of invoices, their status, revenue, and payment information
Constant Summary collapse
- DETAIL_FIELDS =
Available detail fields (when not grouping)
%w[ adjustments_amount business_id business_name business_subdomain closed_at closed_date commission_recipient_name coupons_amount created_by_client created_by_name currency_code days_since_invoice_due discounts_amount expected_amount expected_revenue_amount expected_tax_amount failed_transactions franchise_id gross_amount invoice_autobill invoice_due_date invoice_id invoice_number invoice_payer_email invoice_payer_home_location invoice_payer_id invoice_payer_name invoice_payer_phone invoice_payer_primary_staff_name_at_sale invoice_state issued_at issued_date key net_paid_amount net_paid_revenue_amount net_paid_tax_amount outstanding_amount outstanding_revenue_amount outstanding_tax_amount payments_amount purchase_order_number purchase_request_cancel_reason purchase_request_message purchase_request_state refunded_transactions refunds_amount sale_location_name voided_transactions ].freeze
- SUMMARY_FIELDS =
Available summary fields (when grouping)
%w[ business_id_summary business_subdomain_summary created_by_client_count invoice_autobill_count invoice_count total_adjustments_amount total_count total_coupons_amount total_discounts_amount total_expected_amount total_expected_revenue_amount total_expected_tax_amount total_gross_amount total_net_paid_amount total_net_paid_revenue_amount total_net_paid_tax_amount total_outstanding_amount total_outstanding_revenue_amount total_outstanding_tax_amount total_payments_amount total_refunds_amount ].freeze
- GROUPINGS =
Available grouping fields
%w[ business_id business_name business_subdomain closed_date closed_month_start_date closed_quarter_start_date closed_week_mon_start_date closed_week_sun_start_date closed_year_start_date commission_recipient_name created_by_client created_by_name due_month_start_date due_quarter_start_date due_week_mon_start_date due_week_sun_start_date due_year_start_date invoice_autobill invoice_due_date invoice_payer_home_location invoice_payer_id invoice_payer_name invoice_payer_primary_staff_name_at_sale invoice_state issued_date issued_month_start_date issued_quarter_start_date issued_week_mon_start_date issued_week_sun_start_date issued_year_start_date purchase_request_state sale_location_name ].freeze
Class Method Summary collapse
-
.query(fields:, filter: nil, group: nil, sort: nil, page: nil, total_count: nil) ⇒ Hash
Execute an invoices query.
Methods inherited from Base
Class Method Details
.query(fields:, filter: nil, group: nil, sort: nil, page: nil, total_count: nil) ⇒ Hash
Execute an invoices query
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/pike13/api/v3/desk/invoices.rb', line 39 def query(fields:, filter: nil, group: nil, sort: nil, page: nil, total_count: nil) query_params = { fields: fields } query_params[:filter] = filter if filter query_params[:group] = group if group query_params[:sort] = sort if sort query_params[:page] = page if page query_params[:total_count] = total_count if total_count super("invoices", query_params) end |