Method: ProcessOut::InvoiceDetail#to_json

Defined in:
lib/processout/invoice_detail.rb

#to_json(options) ⇒ Object

Overrides the JSON marshaller to only send the fields we want



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/processout/invoice_detail.rb', line 126

def to_json(options)
  {
      "id": self.id,
      "name": self.name,
      "type": self.type,
      "amount": self.amount,
      "quantity": self.quantity,
      "metadata": self.,
      "reference": self.reference,
      "description": self.description,
      "brand": self.brand,
      "model": self.model,
      "discount_amount": self.discount_amount,
      "condition": self.condition,
      "marketplace_merchant": self.marketplace_merchant,
      "marketplace_merchant_is_business": self.marketplace_merchant_is_business,
      "marketplace_merchant_created_at": self.marketplace_merchant_created_at,
      "category": self.category,
  }.to_json
end