Beispiel #1
0
        private RecipientAccount recipientFactory(string response)
        {
            var tempData = JObject.Parse(response)["account"];
            RecipientAccount recipientAccount = JsonConvert.DeserializeObject <RecipientAccount>(tempData.ToString());

            return(recipientAccount);
        }
Beispiel #2
0
        public RecipientAccount create(string recipient_id, RecipientAccount recipientAccount)
        {
            StringBuilder builder = new StringBuilder();

            builder.AppendFormat("/v1/recipients/{0}/accounts", recipient_id);
            string endPoint = builder.ToString();
            string response = this.gateway.client.post(endPoint, recipientAccount);

            return(recipientFactory(response));
        }
 /// <summary>
 /// Deletes a recipient account for the given recipient
 /// </summary>
 /// <param name="recipient_id"></param>
 /// <param name="recipientAccount"></param>
 /// <returns></returns>
 public static bool delete(string recipient_id, RecipientAccount recipientAccount)
 {
     return(delete(recipient_id, recipientAccount.id));
 }
 /// <summary>
 /// Updates a recipient account for the given recipient
 /// </summary>
 /// <param name="recipient_id"></param>
 /// <param name="recipientAccount"></param>
 /// <returns></returns>
 public static RecipientAccount update(string recipient_id, RecipientAccount recipientAccount)
 {
     return(PaymentRails_Configuration.gateway().recipientAccount.update(recipient_id, recipientAccount));
 }