Payment constructor

Payment(
  1. String transaction_uuid,
  2. String created_at,
  3. String updated_at,
  4. int status_code,
  5. String currency,
  6. String status_denom,
  7. String description,
  8. String merchant_op_id,
  9. double price_total,
  10. List<Product> items,
  11. List<Link> links,
)

Implementation

Payment(this.transaction_uuid, this.created_at,
  this.updated_at, this.status_code, String currency,
  this.status_denom, this.description, this.merchant_op_id,
  this.price_total, this.items, this.links) {

    for (var element in Currency.values) {
      if(element.name == currency){
        this.currency = element;
      }
    }
    for (var element in StatusDenom.values) {
      if(element.name == status_denom){
        status = element;
      }
    }
  }