diff --git a/lib/recurly/billing_info.rb b/lib/recurly/billing_info.rb index 606540307..cb8473858 100644 --- a/lib/recurly/billing_info.rb +++ b/lib/recurly/billing_info.rb @@ -31,6 +31,8 @@ class BillingInfo < Resource geo_code updated_at external_hpp_type + gateway_token + gateway_code ) | CREDIT_CARD_ATTRIBUTES | BANK_ACCOUNT_ATTRIBUTES | AMAZON_ATTRIBUTES | PAYPAL_ATTRIBUTES | ROKU_ATTRIBUTES # @return ["credit_card", "paypal", "amazon", "bank_account", "roku", nil] The type of billing info. diff --git a/spec/recurly/billing_info_spec.rb b/spec/recurly/billing_info_spec.rb index 9962767d4..f9e5274b0 100644 --- a/spec/recurly/billing_info_spec.rb +++ b/spec/recurly/billing_info_spec.rb @@ -2,6 +2,34 @@ describe BillingInfo do + let(:binfo) { + BillingInfo.new( + :first_name => "Larry", + :last_name => "David", + :card_type => "Visa", + :last_four => "1111", + :city => "Los Angeles", + :state => "CA", + ) + } + + it "must serialize" do + binfo.gateway_token = "gatewaytoken123" + binfo.gateway_code = "gatewaycode123" + binfo.to_xml.must_equal <\ +Visa\ +Los Angeles\ +Larry\ +gatewaycode123\ +gatewaytoken123\ +1111\ +David\ +CA\ + +XML + end + describe ".find" do it "must return an account's billing info when available" do stub_api_request(