         }
         return transactionDetails
     }
+    
+    open func toJSON() -> [String:Any] {
+        
+        var obj:[String:Any] = [:]
+        
+        if self.couponAmount != nil {
+            obj["coupon_amount"] = self.couponAmount
+        }
+        if self.externalResourceUrl != nil {
+            obj["external_resource_url"] = self.externalResourceUrl
+        }
+        if self.financialInstitution != nil {
+            obj["financial_institution"] = self.financialInstitution
+        }
+        if self.installmentAmount != nil {
+            obj["installment_amount"] = self.installmentAmount
+        }
+        if self.netReceivedAmount != nil {
+            obj["net_received_amount"] = self.netReceivedAmount
+        }
+        if self.overpaidAmount != nil {
+            obj["overpaid_amount"] = self.overpaidAmount
+        }
+        if self.totalPaidAmount != nil {
+            obj["total_paid_amount"] = self.totalPaidAmount
+        }
+        
+        return obj
+    }
+    
 }
 
 

        if let externalResourceUrl = JSONHandler.attemptParseToString(json["external_resource_url"]){
            transactionDetails.externalResourceUrl = externalResourceUrl
        }
        if let financialInstitution = JSONHandler.attemptParseToString(json["financial_institution"]){
            transactionDetails.financialInstitution = financialInstitution
        }
        if let installmentAmount = JSONHandler.attemptParseToDouble(json["installment_amount"]){
            transactionDetails.installmentAmount = installmentAmount

import Foundation

open class TransactionDetails : NSObject {
    open var couponAmount : Double?
    open var externalResourceUrl : String?
    open var financialInstitution : FinancialInstitution?
    open var installmentAmount : Double?
    open var netReceivedAmount : Double?
    open var overpaidAmount : Double?
    open var totalPaidAmount : Double?
    
    override public init(){
        super.init()
