ey_services_fake 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -147,5 +147,9 @@ module EyServicesFake
147
147
  actor(:service_provider).send_message(message_url, message_type, message_subject, message_body)
148
148
  end
149
149
 
150
+ def send_invoice(invoices_url, total_amount_cent, line_item_description)
151
+ actor(:service_provider).send_invoice(invoices_url, total_amount_cent, line_item_description)
152
+ end
153
+
150
154
  end
151
155
  end
@@ -119,5 +119,11 @@ module EyServicesFake
119
119
  EY::ServicesAPI.connection.send_message(message_url, message)
120
120
  end
121
121
 
122
+ def send_invoice(invoices_url, total_amount_cent, line_item_description)
123
+ invoice = EY::ServicesAPI::Invoice.new(:total_amount_cents => total_amount_cent,
124
+ :line_item_description => line_item_description)
125
+ EY::ServicesAPI.connection.send_invoice(invoices_url, invoice)
126
+ end
127
+
122
128
  end
123
129
  end
@@ -49,13 +49,16 @@ module EyServicesFake
49
49
  has_many :ProvisionedService, :provisioned_services, :service_account_id
50
50
  has_many :Message, :messages, :service_account_id
51
51
  belongs_to :Service, :service, :service_id
52
+ has_many :Invoice, :invoices, :service_account_id
52
53
  end
53
54
  class ProvisionedService < Model
54
55
  has_many :Message, :messages, :provisioned_service_id
55
56
  belongs_to :ServiceAccount, :service_account, :service_account_id
56
57
  end
57
58
  class ServiceEnablement < Model; end
58
- class Invoice < Model; end
59
+ class Invoice < Model
60
+ belongs_to :ServiceAccount, :service_account, :service_account_id
61
+ end
59
62
  class Message < Model
60
63
  belongs_to :ServiceAccount, :service_account, :service_account_id
61
64
  belongs_to :ProvisionedService, :provisioned_service, :provisioned_service_id
@@ -1,3 +1,3 @@
1
1
  module EyServicesFake
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ey_services_fake
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jacob Burkhart & Josh Lane
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-03 00:00:00 Z
18
+ date: 2011-11-10 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: sinatra