lib/recurly/resources/invoice.rb in recurly-3.0.0.beta.3 vs lib/recurly/resources/invoice.rb in recurly-3.0.0.beta.4

- old
+ new

@@ -1,16 +1,20 @@ +# This file is automatically created by Recurly's OpenAPI generation process +# and thus any edits you make by hand will be lost. If you wish to make a +# change to this file, please create a Github issue explaining the changes you +# need and we will usher them to the appropriate places. module Recurly module Resources class Invoice < Resource # @!attribute account # @return [AccountMini] define_attribute :account, :AccountMini # @!attribute address - # @return [Address] - define_attribute :address, :Address + # @return [InvoiceAddress] + define_attribute :address, :InvoiceAddress # @!attribute balance # @return [Float] The outstanding balance remaining on this invoice. define_attribute :balance, Float @@ -18,19 +22,19 @@ # @return [DateTime] Date invoice was marked paid or failed. define_attribute :closed_at, DateTime # @!attribute collection_method # @return [String] An automatic invoice means a corresponding transaction is run using the account's billing information at the same time the invoice is created. Manual invoices are created without a corresponding transaction. The merchant must enter a manual payment transaction or have the customer pay the invoice with an automatic method, like credit card, PayPal, Amazon, or ACH bank payment. - define_attribute :collection_method, String, {:enum => ["automatic", "manual"]} + define_attribute :collection_method, String, { :enum => ["automatic", "manual"] } # @!attribute [r] created_at # @return [DateTime] Created at - define_attribute :created_at, DateTime, {:read_only => true} + define_attribute :created_at, DateTime, { :read_only => true } # @!attribute credit_payments # @return [Array[CreditPayment]] Credit payments - define_attribute :credit_payments, Array, {:item_type => :CreditPayment} + define_attribute :credit_payments, Array, { :item_type => :CreditPayment } # @!attribute currency # @return [String] 3-letter ISO 4217 currency code. define_attribute :currency, String @@ -46,11 +50,11 @@ # @return [DateTime] Date invoice is due. This is the date the net terms are reached. define_attribute :due_at, DateTime # @!attribute [r] id # @return [String] Invoice ID - define_attribute :id, String, {:read_only => true} + define_attribute :id, String, { :read_only => true } # @!attribute line_items # @return [LineItemList] define_attribute :line_items, :LineItemList @@ -62,15 +66,15 @@ # @return [String] If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence. define_attribute :number, String # @!attribute [r] object # @return [String] Object type - define_attribute :object, String, {:read_only => true} + define_attribute :object, String, { :read_only => true } # @!attribute origin # @return [String] The event that created the invoice. - define_attribute :origin, String, {:enum => ["purchase", "line_item_refund", "open_amount_refund", "renewal", "immediate_change", "termination", "credit", "gift_card", "write_off"]} + define_attribute :origin, String, { :enum => ["purchase", "line_item_refund", "open_amount_refund", "renewal", "immediate_change", "termination", "credit", "gift_card", "write_off"] } # @!attribute paid # @return [Float] The total amount of successful payments transaction on this invoice. define_attribute :paid, Float @@ -86,15 +90,15 @@ # @return [Float] The refundable amount on a charge invoice. It will be null for all other invoices. define_attribute :refundable_amount, Float # @!attribute state # @return [String] Invoice state - define_attribute :state, String, {:enum => ["pending", "processing", "past_due", "paid", "failed"]} + define_attribute :state, String, { :enum => ["pending", "processing", "past_due", "paid", "failed"] } # @!attribute subscription_ids # @return [Array[String]] If the invoice is charging or refunding for one or more subscriptions, these are their IDs. - define_attribute :subscription_ids, Array, {:item_type => String} + define_attribute :subscription_ids, Array, { :item_type => String } # @!attribute subtotal # @return [Float] The summation of charges, discounts, and credits, before tax. define_attribute :subtotal, Float @@ -114,18 +118,18 @@ # @return [Float] The final total on this invoice. The summation of invoice charges, discounts, credits, and tax. define_attribute :total, Float # @!attribute transactions # @return [Array[Transaction]] Transactions - define_attribute :transactions, Array, {:item_type => :Transaction} + define_attribute :transactions, Array, { :item_type => :Transaction } # @!attribute type # @return [String] Invoices are either charge, credit, or legacy invoices. - define_attribute :type, String, {:enum => ["charge", "credit", "legacy"]} + define_attribute :type, String, { :enum => ["charge", "credit", "legacy"] } # @!attribute [r] updated_at # @return [DateTime] Last updated at - define_attribute :updated_at, DateTime, {:read_only => true} + define_attribute :updated_at, DateTime, { :read_only => true } # @!attribute vat_number # @return [String] VAT registration number for the customer on this invoice. This will come from the VAT Number field in the Billing Info or the Account Info depending on your tax settings and the invoice collection method. define_attribute :vat_number, String