Class: FakeChargify::Statement

Inherits:
Object
  • Object
show all
Defined in:
lib/fake_chargify/statement.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Statement

Returns a new instance of Statement.



12
13
14
# File 'lib/fake_chargify/statement.rb', line 12

def initialize(attributes = {})
  attributes.each { |key, val| send("#{key}=", val) if respond_to?("#{key}=") }
end

Instance Attribute Details

#basic_html_view ⇒ Object

Returns the value of attribute basic_html_view.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def basic_html_view
  @basic_html_view
end

#closed_at ⇒ Object

Returns the value of attribute closed_at.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def closed_at
  @closed_at
end

#created_at ⇒ Object

Returns the value of attribute created_at.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def created_at
  @created_at
end

#customer_billing_address ⇒ Object

Returns the value of attribute customer_billing_address.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def customer_billing_address
  @customer_billing_address
end

#customer_billing_address_2 ⇒ Object

Returns the value of attribute customer_billing_address_2.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def customer_billing_address_2
  @customer_billing_address_2
end

#customer_billing_city ⇒ Object

Returns the value of attribute customer_billing_city.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def customer_billing_city
  @customer_billing_city
end

#customer_billing_country ⇒ Object

Returns the value of attribute customer_billing_country.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def customer_billing_country
  @customer_billing_country
end

#customer_billing_state ⇒ Object

Returns the value of attribute customer_billing_state.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def customer_billing_state
  @customer_billing_state
end

#customer_billing_zip ⇒ Object

Returns the value of attribute customer_billing_zip.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def customer_billing_zip
  @customer_billing_zip
end

#customer_first_name ⇒ Object

Returns the value of attribute customer_first_name.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def customer_first_name
  @customer_first_name
end

#customer_last_name ⇒ Object

Returns the value of attribute customer_last_name.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def customer_last_name
  @customer_last_name
end

#customer_organization ⇒ Object

Returns the value of attribute customer_organization.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def customer_organization
  @customer_organization
end

#customer_shipping_address ⇒ Object

Returns the value of attribute customer_shipping_address.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def customer_shipping_address
  @customer_shipping_address
end

#customer_shipping_address_2 ⇒ Object

Returns the value of attribute customer_shipping_address_2.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def customer_shipping_address_2
  @customer_shipping_address_2
end

#customer_shipping_city ⇒ Object

Returns the value of attribute customer_shipping_city.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def customer_shipping_city
  @customer_shipping_city
end

#customer_shipping_country ⇒ Object

Returns the value of attribute customer_shipping_country.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def customer_shipping_country
  @customer_shipping_country
end

#customer_shipping_state ⇒ Object

Returns the value of attribute customer_shipping_state.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def customer_shipping_state
  @customer_shipping_state
end

#customer_shipping_zip ⇒ Object

Returns the value of attribute customer_shipping_zip.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def customer_shipping_zip
  @customer_shipping_zip
end

#ending_balance_in_cents ⇒ Object

Returns the value of attribute ending_balance_in_cents.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def ending_balance_in_cents
  @ending_balance_in_cents
end

#events ⇒ Object

Returns the value of attribute events.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def events
  @events
end

#future_payments ⇒ Object

Returns the value of attribute future_payments.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def future_payments
  @future_payments
end

#html_view ⇒ Object

Returns the value of attribute html_view.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def html_view
  @html_view
end

#id ⇒ Object

Returns the value of attribute id.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def id
  @id
end

#opened_at ⇒ Object

Returns the value of attribute opened_at.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def opened_at
  @opened_at
end

#settled_at ⇒ Object

Returns the value of attribute settled_at.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def settled_at
  @settled_at
end

#starting_balance_in_cents ⇒ Object

Returns the value of attribute starting_balance_in_cents.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def starting_balance_in_cents
  @starting_balance_in_cents
end

#subscription_id ⇒ Object

Returns the value of attribute subscription_id.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def subscription_id
  @subscription_id
end

#text_view ⇒ Object

Returns the value of attribute text_view.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def text_view
  @text_view
end

#transactions ⇒ Object

Returns the value of attribute transactions.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def transactions
  @transactions
end

#updated_at ⇒ Object

Returns the value of attribute updated_at.



5
6
7
# File 'lib/fake_chargify/statement.rb', line 5

def updated_at
  @updated_at
end

Instance Method Details

#to_xml ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/fake_chargify/statement.rb', line 16

def to_xml
  builder = Nokogiri::XML::Builder.new do |xml|
    xml.statement {
      xml.id_ id
      xml.subscription_id subscription_id
      xml.opened_at opened_at
      xml.closed_at closed_at
      xml.settled_at settled_at
      xml.text_view text_view
      xml.basic_html_view basic_html_view
      xml.html_view html_view
      xml.starting_balance_in_cents starting_balance_in_cents
      xml.ending_balance_in_cents ending_balance_in_cents
      xml.customer_first_name customer_first_name
      xml.customer_last_name customer_last_name
      xml.customer_organization customer_organization
      xml.customer_shipping_address customer_shipping_address
      xml.customer_shipping_address_2 customer_shipping_address_2
      xml.customer_shipping_city customer_shipping_city
      xml.customer_shipping_state customer_shipping_state
      xml.customer_shipping_country customer_shipping_country
      xml.customer_shipping_zip customer_shipping_zip
      xml.customer_billing_address customer_billing_address
      xml.customer_billing_address_2 customer_billing_address_2
      xml.customer_billing_city customer_billing_city
      xml.customer_billing_state customer_billing_state
      xml.customer_billing_country customer_billing_country
      xml.customer_billing_zip customer_billing_zip
      xml.created_at created_at
      xml.updated_at updated_at
    }
  end
  builder.to_xml
end