Class: Stripe::Invoice

Inherits:
APIResource show all
Includes:
APIOperations::Create, APIOperations::List, APIOperations::Update
Defined in:
lib/stripe/invoice.rb

Instance Attribute Summary

Attributes inherited from StripeObject

#api_key

Class Method Summary collapse

Instance Method Summary collapse

Methods included from APIOperations::Create

included

Methods included from APIOperations::Update

#save

Methods included from APIOperations::List

included

Methods inherited from APIResource

class_name, #refresh, retrieve, url, #url

Methods inherited from StripeObject

#[], #[]=, #as_json, construct_from, #each, #initialize, #inspect, #keys, #refresh_from, #to_hash, #to_json, #to_s, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Class Method Details

.upcoming(params) ⇒ Object



7
8
9
10
# File 'lib/stripe/invoice.rb', line 7

def self.upcoming(params)
  response, api_key = Stripe.request(:get, upcoming_url, @api_key, params)
  Util.convert_to_stripe_object(response, api_key)
end

Instance Method Details

#payObject



12
13
14
15
16
# File 'lib/stripe/invoice.rb', line 12

def pay
  response, api_key = Stripe.request(:post, pay_url, @api_key)
  refresh_from(response, api_key)
  self
end