Sha256: 95b648bbaf396b909d74bd9d1e01355e52f8562ee27ba8f5eeb2ece557d1de57

Contents?: true

Size: 810 Bytes

Versions: 6

Compression:

Stored size: 810 Bytes

Contents

module BillForward
	class PaymentMethod < MutableEntity
  		@resource_path = BillForward::ResourcePath.new("payment-methods", "paymentMethod")

  		class << self
  			def get_by_link_id(id, query_params = {}, custom_client = nil)
		        raise ArgumentError.new("id cannot be nil") if id.nil?

		        endpoint = sprintf('link-id/%s',
		          ERB::Util.url_encode(id)
		          )

		        self.request_first('get', endpoint, query_params, custom_client)
		    end

		    def get_by_account_id(id, query_params = {}, custom_client = nil)
		        raise ArgumentError.new("id cannot be nil") if id.nil?

		        endpoint = sprintf('account/%s',
		          ERB::Util.url_encode(id)
		          )

		        self.request_many('get', endpoint, query_params, custom_client)
		    end
  		end
	end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bill_forward-1.2016.26 lib/bill_forward/entities/payment_method.rb
bill_forward-1.2015.321.1 lib/bill_forward/entities/payment_method.rb
bill_forward-1.2015.321 lib/bill_forward/entities/payment_method.rb
bill_forward-1.2015.299 lib/bill_forward/entities/payment_method.rb
bill_forward-1.2015.217.1 lib/bill_forward/entities/payment_method.rb
bill_forward-1.2015.217 lib/bill_forward/entities/payment_method.rb