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

- old
+ new

@@ -22,15 +22,15 @@ # @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 - # @!attribute [r] created_at + # @!attribute created_at # @return [DateTime] Created at - define_attribute :created_at, DateTime, { :read_only => true } + define_attribute :created_at, DateTime # @!attribute credit_payments # @return [Array[CreditPayment]] Credit payments define_attribute :credit_payments, Array, { :item_type => :CreditPayment } @@ -48,13 +48,13 @@ # @!attribute due_at # @return [DateTime] Date invoice is due. This is the date the net terms are reached. define_attribute :due_at, DateTime - # @!attribute [r] id + # @!attribute id # @return [String] Invoice ID - define_attribute :id, String, { :read_only => true } + define_attribute :id, String # @!attribute line_items # @return [LineItemList] define_attribute :line_items, :LineItemList @@ -64,17 +64,17 @@ # @!attribute number # @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 + # @!attribute object # @return [String] Object type - define_attribute :object, String, { :read_only => true } + define_attribute :object, String # @!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 # @!attribute paid # @return [Float] The total amount of successful payments transaction on this invoice. define_attribute :paid, Float @@ -90,11 +90,11 @@ # @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 # @!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 } @@ -122,14 +122,14 @@ # @return [Array[Transaction]] Transactions 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 - # @!attribute [r] updated_at + # @!attribute updated_at # @return [DateTime] Last updated at - define_attribute :updated_at, DateTime, { :read_only => true } + define_attribute :updated_at, DateTime # @!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