Beispiel #1
0
 /// <summary>
 /// Payment constructor.
 /// </summary>
 /// <param name="reference">string</param>
 /// <param name="description">string</param>
 /// <param name="allowPartial">bool</param>
 /// <param name="subscribe">bool</param>
 /// <param name="agreement">string</param>
 /// <param name="agreementType">string</param>
 /// <param name="amount">Amount</param>
 /// <param name="recurring">Recurring</param>
 /// <param name="shipping">Person</param>
 /// <param name="items">List of Item</param>
 /// <param name="fields">List of NameValuePair</param>
 /// <param name="instrument">Instrument</param>
 public Payment(
     string reference,
     string description,
     bool allowPartial,
     bool subscribe,
     string agreement,
     string agreementType,
     Amount amount,
     Recurring recurring,
     Person shipping,
     List <Item> items,
     List <NameValuePair> fields,
     Instrument instrument
     )
 {
     this.reference     = reference;
     this.description   = description;
     this.allowPartial  = allowPartial;
     this.subscribe     = subscribe;
     this.agreement     = agreement;
     this.agreementType = agreementType;
     this.amount        = amount;
     this.recurring     = recurring;
     this.shipping      = shipping;
     this.items         = items;
     this.fields        = fields;
     this.instrument    = instrument;
 }
Beispiel #2
0
 /// <summary>
 /// DispersionPayment constructor.
 /// </summary>
 /// <param name="reference">string</param>
 /// <param name="description">string</param>
 /// <param name="allowPartial">bool</param>
 /// <param name="subscribe">bool</param>
 /// <param name="agreement">string</param>
 /// <param name="agreementType">string</param>
 /// <param name="amount">Amount</param>
 /// <param name="recurring">Recurring</param>
 /// <param name="shipping">Person</param>
 /// <param name="items">List of Item</param>
 /// <param name="fields">List of NameValuePair</param>
 /// <param name="instrument">Instrument</param>
 /// <param name="dispersion">List of Payments</param>
 public DispersionPayment(
     string reference,
     string description,
     bool allowPartial,
     bool subscribe,
     string agreement,
     string agreementType,
     Amount amount,
     Recurring recurring,
     Person shipping,
     List <Item> items,
     List <NameValuePair> fields,
     Instrument instrument,
     List <Payment> dispersion
     ) : base(
         reference,
         description,
         allowPartial,
         subscribe,
         agreement,
         agreementType,
         amount,
         recurring,
         shipping,
         items,
         fields,
         instrument
         )
 {
     this.dispersion = dispersion;
 }
Beispiel #3
0
 /// <summary>
 /// Json Object sent back from API.
 /// </summary>
 /// <returns>JsonObject</returns>
 public override JObject ToJsonObject()
 {
     return(JObjectFilter(new JObject {
         { REFERENCE, Reference },
         { DESCRIPTION, Description },
         { AMOUNT, Amount?.ToJsonObject() },
         { ALLOW_PARTIAL, AllowPartial },
         { SHIPPING, Shipping?.ToJsonObject() },
         { ITEMS, ItemsToJArray() },
         { RECURRING, Recurring?.ToJsonObject() },
         { SUBSCRIBE, Subscribe },
         { FIELDS, this.FieldsToJArray <Payment>() },
         { AGREEMENT, Agreement },
         { AGREEMENT_TYPE, AgreementType },
         { GDS, Gds?.ToJsonObject() },
     }));
 }