Skip to content

Commit

Permalink
Update to API Version 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Sascha Korth committed Sep 4, 2013
1 parent 56f8d20 commit 8b9f40c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Fastbill Automatic
==================

This is a Ruby wrapper for FastBill's Automatic API based on API-Documentation v1.6 (21.08.2013)
This is a Ruby wrapper for FastBill's Automatic API based on API-Documentation v1.8 (PA. 04.09.2013)

Usage
======

First, you've to install the gem

gem 'fastbill-automatic', git: 'git://github.com/reputami/fastbill-automatic.git', tag: 'v0.0.1'
gem 'fastbill-automatic', git: 'git://github.com/reputami/fastbill-automatic.git', tag: 'v0.0.2'

and require it

Expand Down
Binary file removed doc/API-Doku_FBA_V1-6.pdf
Binary file not shown.
Binary file added doc/API-Doku_FBA_V1-8.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/fastbill-automatic/customer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Customer < Base
:customer_ext_uid, :customer_type, :organization, :position, :salutation, :first_name, :last_name,
:address, :address_2, :zipcode, :phone, :phone_2, :fax, :mobile, :email, :account_receivable, :currency_code,
:vat_id, :days_for_payment, :payment_type, :show_payment_notice, :bank_name, :bank_code, :bank_account_number,
:bank_account_owner
:bank_account_owner, :newsletter_optin, :language_code

attr_reader :customer_id, :dashboard_url, :changedate_url, :status
end
Expand Down
4 changes: 2 additions & 2 deletions lib/fastbill-automatic/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class Subscription < Base
include Fastbill::Automatic::Services::Cancel

attr_accessor :subscription_id, :customer_id, :subscription_ext_uid, :article_number, :customer_id,
:coupon, :title, :unit_price, :currency_code, :next_event, :unit_price, :quantity,
:description, :usage_date
:coupon, :title, :unit_price, :currency_code, :next_event, :quantity, :description,
:usage_date
end
end
end
13 changes: 8 additions & 5 deletions spec/fastbill-automatic/customer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
describe Fastbill::Automatic::Customer do

let(:valid_attributes) do
{ customer_number: "5", customer_ext_uid: "", days_for_payment: "14", payment_type: "1", show_payment_notice: "1",
{ customer_number: "5", customer_ext_uid: "123456", days_for_payment: "14", payment_type: "1", show_payment_notice: "1",
customer_type: "consumer", organization: "Server Hosting GmbH", salutation: "mr", first_name: "Klaus",
last_name: "Testkunde", address: "Test Strasse 41", zipcode: "26123", city: "Oldenburg", phone: "049 123 456 789",
fax: "049 123 456 987", email: "support@fastbill.com", paymill_token: "", comment: ""
fax: "049 123 456 987", email: "support@fastbill.com", paymill_token: "123456", comment: "some comment",
newsletter_optin: "1", language_code: "de"
}
end

Expand All @@ -17,7 +18,7 @@
describe "#initialize" do
it "initializes all attributes correctly" do
customer.customer_number.should eql("5")
customer.customer_ext_uid.should eql("")
customer.customer_ext_uid.should eql("123456")
customer.days_for_payment.should eql("14")
customer.payment_type.should eql("1")
customer.show_payment_notice.should eql("1")
Expand All @@ -32,8 +33,10 @@
customer.phone.should eql("049 123 456 789")
customer.fax.should eql("049 123 456 987")
customer.email.should eql("support@fastbill.com")
customer.paymill_token.should eql("")
customer.comment.should eql("")
customer.paymill_token.should eql("123456")
customer.comment.should eql("some comment")
customer.newsletter_optin.should eql("1")
customer.language_code.should eql("de")
end
end

Expand Down

0 comments on commit 8b9f40c

Please sign in to comment.