Sha256: af56d35b55101470dc0e6072ed150005d05045264ccd6e1ff923d3527dcef0f3

Contents?: true

Size: 854 Bytes

Versions: 1

Compression:

Stored size: 854 Bytes

Contents

# encoding: utf-8
module Zuora
  module Resources
    module PaymentMethods
      module CreditCards
        RESOURCE_URI = '/rest/v1/credit_card/payment_account'

        # Validates a model, and throws if invalid.
        # Otherwise, makes an HTTP request, creating a credit card
        # payment account.

        # https://api.zuora.com/rest/v1/payment-methods/credit-cards

        # @param [Zuora::Client] client
        # @param [Zuora::Model::PaymentMethod] model: the credit card
        # @param [Class] serializer: any object supporting .serialze(data)
        # @return [Faraday::Response]
        def self.create!(client, model, serializer = Zuora::Serializers::Noop)
          Zuora::Resources.with_valid model do |mod|
            client.post RESOURCE_URI, serializer.serialize(mod)
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zuora-ruby-0.1.0 lib/zuora/resources/payment_methods/credit_card.rb