Skip to content

Commit

Permalink
Rename Domain to JSONRequest to allow for future XMLRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
cassidycodes committed Oct 18, 2019
1 parent 2c60302 commit 0171400
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/bambora/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(options = {})
yield(self) if block_given?
end

def_delegators :connection, :get, :post, :patch, :put, :delete, :request
def_delegators :connection, :request

# Summary: Payment profiles store confidential payment information. Transactions can be processed against profiles.
# Docs: https://dev.na.bambora.com/docs/guides/payment_profiles/
Expand Down
2 changes: 1 addition & 1 deletion lib/bambora/domain.rb → lib/bambora/json_request.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

module Bambora
class Domain
class JSONRequest
attr_reader :client

def initialize(client)
Expand Down
2 changes: 1 addition & 1 deletion lib/bambora/profile.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

module Bambora
class Profile < Domain
class Profile < JSONRequest
def initialize(client)
super

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'spec_helper'

module Bambora
describe Bambora::Profile do
describe JSONRequest do
let(:api_key) { 'fakekey' }
let(:merchant_id) { 1 }
let(:base_url) { 'https://sandbox-api.na.bambora.com' }
Expand Down

0 comments on commit 0171400

Please sign in to comment.