Class: Recurly::Adjustment
- Defined in:
- lib/recurly/adjustment.rb
Class Attribute Summary collapse
-
.type ⇒ "charge", ...
readonly
The type of adjustment.
Attributes inherited from Resource
#attributes, #etag, #response, #uri
Class Method Summary collapse
- .account ⇒ Account?
-
.charges ⇒ Pager<Adjustment>
A pager that yields
charges
. -
.credits ⇒ Pager<Adjustment>
A pager that yields
credits
. -
.initialize(attributes = {}) ⇒ Adjustment
Adjustments should be built through Account instances.
- .invoice ⇒ Invoice?
-
.invoiced ⇒ Pager<Adjustment>
A pager that yields
invoiced
. -
.pending ⇒ Pager<Adjustment>
A pager that yields
pending
.
Methods inherited from Resource
#==, all, associations, belongs_to, #changed, #changed?, #changed_attributes, #changes, collection_name, count, create, create!, define_attribute_methods, #destroy, #destroyed?, embedded!, #errors, find, find_each, first, from_response, from_xml, has_many, has_one, #initialize, #inspect, member_name, member_path, #new_record?, paginate, #persist!, #persisted?, #previous_changes, #read_attribute, reflect_on_association, #reload, resource_name, #save, #save!, scope, scopes, #to_param, #to_xml, #update_attributes, #update_attributes!, #valid?, #write_attribute
Constructor Details
This class inherits a constructor from Recurly::Resource
Class Attribute Details
.type ⇒ "charge", ... (readonly)
Returns The type of adjustment.
37 38 39 |
# File 'lib/recurly/adjustment.rb', line 37 def type @type end |
Class Method Details
.charges ⇒ Pager<Adjustment>
Returns a pager that yields charges
.
6 |
# File 'lib/recurly/adjustment.rb', line 6 scope :charges, :type => 'charge' |
.credits ⇒ Pager<Adjustment>
Returns a pager that yields credits
.
7 |
# File 'lib/recurly/adjustment.rb', line 7 scope :credits, :type => 'credit' |
.initialize(attributes = {}) ⇒ Adjustment
Adjustments should be built through Recurly::Account instances.
45 46 47 |
# File 'lib/recurly/adjustment.rb', line 45 def initialize attributes = {} super({ :currency => Recurly.default_currency }.merge attributes) end |
.invoiced ⇒ Pager<Adjustment>
Returns a pager that yields invoiced
.
10 |
# File 'lib/recurly/adjustment.rb', line 10 scope :invoiced, :state => 'invoiced' |
.pending ⇒ Pager<Adjustment>
Returns a pager that yields pending
.
9 |
# File 'lib/recurly/adjustment.rb', line 9 scope :pending, :state => 'pending' |