ammado 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb86a9768496387bdb9b1c6bbbcf12839c9e0b9e
4
- data.tar.gz: a82367a23d207e7297e3d2e18f2c362645f15662
3
+ metadata.gz: b6f9de44b24d12957276291cd7a5573129aa0b40
4
+ data.tar.gz: 49b88db753a04a30567e41614b8bc78e638859a7
5
5
  SHA512:
6
- metadata.gz: 9213f93fdceb8f1d70914974e21ea2d8b14d7c04c944340e0d7132491d4bb5202c241a40fb09efeb7ba9f886443bd8a5f1330b23b520db46221f062d213176e9
7
- data.tar.gz: 3267e0750bbfa5b790fe431daab9916bbdddbbbc0414b28f1c72094a3470702452c6c46e13ffade94c3ea13fc9661740676f0e2adf5e429168e15ef745e3a145
6
+ metadata.gz: 10538c98213cf8c0e7f419cba9ac8e08938c174bdc4d45fa070aabfe7dc650133579368341847be31f7d360a458d1a7ca54c93540ec3adeffcb8291b4da82c08
7
+ data.tar.gz: 92bab41fc4ba7bee974324bd1a1eb26be3bc2ea94e579f9e144e3ff34e55353bcf3b8a3f7a586f4543834289ddfbe90a85d9b88a1e64230ab3feb6481d695078
data/README.md CHANGED
@@ -45,9 +45,12 @@ Implemented Endpoints and their usage
45
45
  -------------------------------------
46
46
 
47
47
 
48
- Note: you acn use parameter names both "beneficiary_id" and "beneficiaryId", but for better readibility and following Ruby standards,
48
+ Note: you acn use parameter names both "model.beneficiary_id" and "model.beneficiaryId", but for better readibility and following Ruby standards,
49
49
  I recommend under_scored, not camelCase.
50
50
 
51
+ All the existing params can be set with "model.some_param=value" and "model.someParam=value".
52
+
53
+ To read all the params use "model.params" containing all the resource params.
51
54
 
52
55
 
53
56
  ### https://api.ammado.com/#FundraiserEndpoint
@@ -73,6 +76,24 @@ puts "All params for fundraiser are: #{ ammado_fundraiser.params.inspect }"
73
76
  ```
74
77
 
75
78
 
79
+ ### https://api.ammado.com/#BeneficiaryEndpoint
80
+
81
+ ```ruby
82
+ ammado_beneficiary = Ammado::Beneficiary.find(123)
83
+
84
+ if ammado_beneficiary
85
+ puts "Found a beneficiary, with type: "
86
+ puts ammado_beneficiary.beneficiary_type
87
+ puts "With raised amount: "
88
+ puts ammado_beneficiary.raised_amount
89
+ else
90
+ puts "Beneficiary not found"
91
+ end
92
+
93
+ puts "All params for ammado_beneficiary are: #{ ammado_beneficiary.params.inspect }"
94
+ ```
95
+
96
+
76
97
 
77
98
  ### https://api.ammado.com/#FundraiserModeratorEndpoint
78
99
 
@@ -131,7 +152,7 @@ ammado_fundraiser_avatar = Ammado::FundraiserAvatar.create(
131
152
  if ammado_fundraiser_avatar.created?
132
153
  puts "Created a moderator, with params: #{ ammado_fundraiser_avatar.params.inspect }"
133
154
  else
134
- puts "Failed to create fundraiser and got errors"
155
+ puts "Failed to create ammado_fundraiser_avatar and got errors"
135
156
  puts ammado_fundraiser_avatar.errors.map(&:message).join(', ')
136
157
  end
137
158
  ```
@@ -151,7 +172,7 @@ ammado_fundraiser_cover = Ammado::FundraiserCover.create(
151
172
  if ammado_fundraiser_cover.created?
152
173
  puts "Created a moderator, with params: #{ ammado_fundraiser_cover.params.inspect }"
153
174
  else
154
- puts "Failed to create fundraiser and got errors: "
175
+ puts "Failed to create ammado_fundraiser_cover and got errors: "
155
176
  puts ammado_fundraiser_cover.errors.map(&:message).join(', ')
156
177
  end
157
178
  ```
data/ammado.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "ammado"
8
- s.version = "1.0.1"
8
+ s.version = "1.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Margus Pärt"]
@@ -8,6 +8,7 @@ module Ammado
8
8
  return resource
9
9
  end
10
10
 
11
+
11
12
  attr_accessor :params
12
13
 
13
14
  def create
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ammado
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Margus Pärt