allpay_invoice 0.0.3 → 0.0.5

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: 40f22a1430eb3bca05c873d72ed7c32778f4b06f
4
- data.tar.gz: 51a41f6bb11aa18336cf4435b421adf6bd07ff20
3
+ metadata.gz: cd8fb36c4b1d1b34f34ba1ee17732bed1f659ee3
4
+ data.tar.gz: 9eabb39c0314c618f6d67d0654fcb19068abcb23
5
5
  SHA512:
6
- metadata.gz: 57489c9d1b12a23833d80b73b885557c6a1143dbecf59d55da91e680120c3885f15345176c321347a516cd2c7870dd0df1b7b19728991180f582751465c455df
7
- data.tar.gz: c886d5c34c23ed5e19282613ed218f18b668075832e871e4b254b58a7c8a3429081def43753c4d62027ef192996bf0d7cc90a7ec5564e0bcb074450754575a8a
6
+ metadata.gz: e444292d141aaca5d7ed06b70a45ddd14f9a60cbaedae8670c8f73b639b23fa425f5e6d5eaee8badaa75a7702d21d5154e3031eac13216a3638628abd809c783
7
+ data.tar.gz: 8f89012d123f1cf041081b7a7c162bc3d2bde96e900554b587e24fce55f15f12b02a25f00f5ed407d7fb2108164ce5710408d6cbdeab2c5724b43374bc63645f
data/README.md CHANGED
@@ -21,8 +21,34 @@ Or install it yourself as:
21
21
  $ gem install allpay_invoice
22
22
 
23
23
  ## Usage
24
-
25
- TODO: Write usage instructions here
24
+ init:
25
+
26
+ $ @client = AllpayInvoice::Invoice.new(mode: :test)
27
+ create new invoice:
28
+
29
+ $ @client.issue TimeStamp: Time.now.to_i,
30
+ RelateNumber: SecureRandom.hex(6),
31
+ CustomerIdentifier: '',
32
+ CustomerName: 'bird的rspec',
33
+ CustomerAddr: 'bird的rspec_address',
34
+ CustomerPhone: '',
35
+ CustomerEmail: 'bird1204@gmail.com',
36
+ ClearanceMark: '',
37
+ Print: '1',
38
+ Donation: '2',
39
+ CarruerType: '',
40
+ CarruerNum: '',
41
+ TaxType: '1',
42
+ SalesAmount: 200,
43
+ InvoiceRemark: 'remark備註',
44
+ ItemName: '車子1|item2',
45
+ ItemCount: '1|1',
46
+ ItemWord: '個|份',
47
+ ItemPrice: '100|100',
48
+ ItemTaxType: '1|1',
49
+ ItemAmount: '100|100',
50
+ InvType: '07',
51
+ InvCreateDate: Time.now.strftime('%Y-%m-%d %H:%M:%S')
26
52
 
27
53
  ## Development
28
54
 
@@ -1,4 +1,4 @@
1
- module Allpay
1
+ module AllpayInvoice
2
2
  # Generic Allpay exception class.
3
3
  class AllpayError < StandardError; end
4
4
  class MissingOption < AllpayError; end
@@ -5,7 +5,7 @@ require 'digest'
5
5
  require 'allpay_invoice/errors'
6
6
  require 'allpay_invoice/core_ext/hash'
7
7
 
8
- module Allpay
8
+ module AllpayInvoice
9
9
  class Invoice
10
10
  PRE_ENCODE_COLUMN = [:CustomerName, :CustomerAddr , :CustomerEmail, :ItemName, :ItemWord, :InvoiceRemark, :InvCreateDate, :NotifyMail, :Reason, :IIS_Customer_Name, :IIS_Customer_Addr]
11
11
  BLACK_LIST_COLUMN = [:ItemName, :ItemWord, :InvoiceRemark, :Reason]
@@ -1,3 +1,3 @@
1
1
  module AllpayInvoice
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -1 +1,3 @@
1
- require 'allpay'
1
+ require 'allpay_invoice/invoice'
2
+ module AllpayInvoice
3
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allpay_invoice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wei-Yi Chiu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-11 00:00:00.000000000 Z
11
+ date: 2015-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -54,7 +54,6 @@ files:
54
54
  - allpay_invoice.gemspec
55
55
  - bin/console
56
56
  - bin/setup
57
- - lib/allpay.rb
58
57
  - lib/allpay_invoice.rb
59
58
  - lib/allpay_invoice/core_ext/hash.rb
60
59
  - lib/allpay_invoice/errors.rb
data/lib/allpay.rb DELETED
@@ -1,4 +0,0 @@
1
- require 'allpay_invoice/invoice'
2
- require "allpay_invoice/version"
3
- module Allpay
4
- end