Exemplo n.º 1
0
        public void SerializeDeserialize_GiftCardRemoveValue()
        {
            GiftCardRemoveValueRequestBody gcAdd = new GiftCardRemoveValueRequestBody("LU_88_TestConsumerQrData_88_LU", 10);

            GiftCardRemoveValueRequestBody deserialized =
                TestUtilities.SerializeThenDeserialize <GiftCardRemoveValueRequestBody>(gcAdd);

            Assert.IsNotNull(deserialized);
            Assert.IsTrue(TestUtilities.PublicPropertiesAreEqual(gcAdd, deserialized));
        }
 public GiftCardRemoveValueResponse GiftCardDestroyValue(string accessToken, int merchantId, GiftCardRemoveValueRequestBody removeValueRequest)
 {
     return(GiftCardDestroyValue(accessToken, merchantId, removeValueRequest.GiftCardQrData, removeValueRequest.AmountInCents));
 }
Exemplo n.º 3
0
        public GiftCardRemoveValueResponse GiftCardDestroyValue(string accessToken, int merchantId, GiftCardRemoveValueRequestBody removeValueRequest)
        {
            GiftCardRemoveValueRequest request = new GiftCardRemoveValueRequest(accessToken, merchantId, removeValueRequest);

            return(_restWrapper.Post <GiftCardRemoveValueRequestBody, GiftCardRemoveValueResponse>(
                       request.Body,
                       uri: BuildUri(request.ApiVersion, $"merchants/{request.MerchantId}/gift_card_value_removals"),
                       accessTokenHeader: FormatAccessTokenString(unspecifiedUserAccessToken: request.AccessToken),
                       actions: null));
        }